]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Update visibility after updating workspaces
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 18 Mar 2023 16:54:35 +0000 (17:54 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 21 Mar 2023 12:02:52 +0000 (12:02 +0000)
When the number of workspaces changes, it is possible that one
of the visible (non-active) workspaces is removed, and another
invisible workspace moves in its place.

Make sure that workspaces are shown as necessary in this case.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6519

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2699>

js/ui/workspacesView.js

index 29d1c65f12f54b5098d6bdd72005782ecc21b432..22e66f77ad0333861b928e130c7b0406f5563828 100644 (file)
@@ -118,7 +118,6 @@ class WorkspacesView extends WorkspacesViewBase {
 
         global.window_manager.connectObject('switch-workspace',
             this._activeWorkspaceChanged.bind(this), this);
-        this._updateVisibility();
     }
 
     _getFirstFitAllWorkspaceBox(box, spacing, vertical) {
@@ -465,6 +464,7 @@ class WorkspacesView extends WorkspacesViewBase {
         }
 
         this._updateWorkspacesState();
+        this._updateVisibility();
     }
 
     _activeWorkspaceChanged(_wm, _from, _to, _direction) {